#!/bin/bash
# This is to check puppet service
# if puppet config to run then check puppet service
echo "############################### restart"
date
/usr/bin/systemctl is-enabled puppet
if [ $? -eq 0 ]
then
  #if puppet no run then run it
  random_number=$((RANDOM%1800+1))
  /usr/bin/sleep $random_number && /usr/bin/systemctl restart puppet
fi
